home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual Foxpro 6.0 (Ent. Edition) / Vf6ent Extractor.EXE / TOOLS / XSOURCE / XSOURCE.ZIP / vfpsource / Builders / bldrmain.prg next >
Encoding:
Text File  |  1998-05-01  |  1.6 KB  |  65 lines

  1. * Program:        BldrMain.PRG
  2. * Description:    Main program file for Command Builder
  3. *               Intended to be called from BUILDER.APP, so all environment
  4. *               and other settings should have been made there.
  5. * Version:        .050
  6. * -----------------------------------------------------------------------------------------
  7.  
  8. PARAMETERS p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p12, p13, p14, p15
  9.  
  10. PRIVATE m.wbReturnValue, m.cParmstring
  11. LOCAL wbi
  12.  
  13. *- make sure we are not called directly
  14. IF PROGRAM(0) == C_MAIN
  15.     *- called directly, so fail
  16.     =MESSAGEBOX(C_BADCALL1_LOC)
  17.     RETURN
  18. ENDIF
  19.  
  20. IF TYPE("wboObject") # 'O'
  21.     *- environment doesn't appear to be set up properly
  22.     =MESSAGEBOX(C_BADCALL2_LOC)
  23.     RETURN
  24. ENDIF
  25.  
  26. RELEASE wboName
  27. PUBLIC wboName
  28.  
  29. m.cParmstring = ""
  30. FOR m.wbi = 1 to PARAMETERS()
  31.     m.thisp = "p" + LTRIM(STR(m.wbi))
  32.     m.cParmstring = m.cParmstring + IIF(!EMPTY(cParmString),",","") + m.thisp    && will create ...,p1,p2,..." etc
  33. ENDFOR
  34.  
  35. SELECT (wboObject.wbaEnvir[5])
  36.  
  37. m.wbReturnValue = wboObject.wbReturnValue
  38.  
  39. SET CLASSLIB TO C_VCX ADDITIVE
  40.  
  41. wboName = CREATEOBJ(wboObject.wbcBldrClass, &cParmstring)        && all builders and wizards are modal formsets
  42.  
  43. IF TYPE("_TIMING") <> "U" AND _TIMING
  44.     RETURN
  45. ENDIF
  46.  
  47. IF TYPE("wboName") = "O"
  48.     wboName.SHOW
  49. #IF 0
  50.     IF wboName.wbcName = "RIBUILDR"
  51.         SET SKIP OF BAR _MWI_DEBUG OF _MSM_TOOLS .f.
  52.         SET SKIP OF BAR _MWI_TRACE OF _MSM_TOOLS .f.
  53.     ENDIF
  54. #ENDIF
  55. ENDIF
  56.  
  57. wboObject.wbReturnValue = m.wbReturnValue
  58.  
  59. IF wboObject.wblModal                            && don't release, if modeless for testing
  60.     RELEASE wboName
  61.     IF FILE(C_VCX)
  62.         RELEASE CLASSLIB C_VCX
  63.     ENDIF
  64. ENDIF
  65.